#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    char hash[500];
    scanf("%s", hash);
    int len = strlen(hash);
    int sum = 0;
    int count[500] = { 0 };
    int max = hash[0];
    int min = hash[0];
    for (int i = 0; i < len; i++)
    {
        if (hash[i] < min)
        {
            min = hash[i];
        }
        if (hash[i] > max)
        {
            max = hash[i];
        }
    }
    int range = max - min + 1;
    for (int i = 0;i < len;i++)
    {
        count[hash[i] - min]++;
    }
    for (int i = 0;i < range;i++)
    {
        if (count[i] != 0)
        {
            sum++;
        }
    }
    printf("%d", sum);
}